<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun Build and Run Instructions: Porting from Box2D</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun Build and Run Instructions
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('md__porting_from_box2_d.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Porting from Box2D </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>LiquidFun extends Erin Catto's popular Box2D physics engine. If your project already uses Box2D, LiquidFun should be a simple drop-in replacement for you.</p>
<h3>Drop-in LiquidFun Code</h3>
<p>To port from Box2D to LiquidFun, simply replace your Box2D directory with liquidfun/Box2D/Box2D. Your code should compile and run as it did under Box2D, and you will have access to LiquidFun's particle simulation API.</p>
<p>LiquidFun is based off of a specific version of Box2D. If your version of Box2D is different from LiquidFun's you may have to adjust your code to match API differences.</p>
<p>Please see the <a href="../../ReleaseNotes.html">Release Notes</a> to find the version of Box2D that LiquidFun is based on.</p>
<h3>Specify <code>particleIterations</code></h3>
<p>LiquidFun adds a <code>particleIterations</code> parameter to b2World::Step. If you don't specify <code>particleIterations</code>, we calculate a default value based on the physical constants in your b2ParticleSystems.</p>
<p>However, the number of <code>particleIterations</code> affects performance and stability significantly. You should experiment with the number of iterations to find a suitable balance for your situation.</p>
<h3>Start using b2ParticleSystem</h3>
<p><code>b2ParticleSystems</code> are created with <code>b2World::CreateParticleSystem</code>, the same way <code>b2Bodys</code> are created with <code>b2World::CreateBody</code>.</p>
<p>For details, please see <a href="../../Programmers-Guide/html/md__chapter11__particles.html">Particle Module</a> in the <a href="../../Programmers-Guide/html/index.html">Programmer's Guide</a> </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
